/************************************************
Project: Samuel E. Ross Econ Thesis

File: Regression Analysis

Before running the following file:
	
	-Designate SamuelERossEconThesis/ as the working directory
	
************************************************/

clear
set more off

* set working directory
// cd <insert path to SamuelERossEconThesis/>

* use monthly data
use "Data/AnalysisData/analysis_monthly.dta", clear

* start log
log using Output/Results/Regressions/regressions

* run regressions using Ahn et al. shocks
reg uip bond_supply if mp_shock!=.
reg uip bond_supply ebp if mp_shock!=.
reg uip bond_supply mp_max cbi_max if mp_shock!=.
reg uip bond_supply ebp mp_max cbi_max if mp_shock!=.

* run regressions using EPU shocks
reg uip bond_supply if mp_shock!=.
reg uip bond_supply ebp if mp_shock!=.
reg uip bond_supply epu_* if mp_shock!=.
reg uip bond_supply ebp epu_* if mp_shock!=.

* use quarterly data
use "Data/AnalysisData/analysis_quarterly.dta", clear

* run regressions using Ahn et al. shocks
reg d_z bond_supply
reg d_z bond_supply ebp
reg d_z bond_supply mp_shock_4max cbi_shock_4max 
reg d_z bond_supply ebp mp_shock_4max cbi_shock_4max

* run regressions using EPU shocks
reg d_z bond_supply
reg d_z bond_supply ebp
reg d_z bond_supply epu_*
reg d_z bond_supply ebp epu_*

* close log and translate
log close
translate Output/Results/Regressions/regressions.smcl Output/Results/Regressions/regressions.txt, replace
rm Output/Results/Regressions/regressions.smcl
